﻿using System;
namespace Bit.Art.Core.Models
{
    /// <summary>
    /// 与SSO API通信的消息类型
    /// </summary>
    public class AccountMessage
    {
        /// <summary>
        /// 消息类型，取值参考：<seealso cref="AccountMessageType"/>
        /// </summary>
        /// <value>The type.</value>
        public int Type { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string Username { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string Cellphone { get; set; }

        /// <summary>
        /// 用户头像的URL，可以是.jpg, .png等图片格式，URL的长度不能超过255的字节
        /// </summary>
        public string Avatar { get; set; }

        /// <summary>
        /// 用户昵称, 长度不能超过255个字节
        /// </summary>
        public string Nickname { get; set; }
    }

    /// <summary>
    /// 与SSO API通信的消息类型
    /// </summary>
    public enum AccountMessageType
    {
        /// <summary>
        /// 注册用消息
        /// </summary>
        Register,
        /// <summary>
        /// 登录消息
        /// </summary>
        Login,
        /// <summary>
        /// 注销消息
        /// </summary>
        Logout,
        /// <summary>
        /// 更新用户信息
        /// </summary>
        UpdateProfile
    }
}
